def _installed():
    from os.path import abspath, dirname, join
    path_f0 = join(dirname(abspath(__file__)),'.')
    return 'site-packages' in path_f0

def chdir0():
    name = 'rizefs'
    from distutils import sysconfig
    import os
    plib = sysconfig.get_python_lib()
    if _installed():
        os.chdir(plib+'/'+name)
    else:
        os.chdir(name)
